package haltica.com.mx.ape.domain;

import java.util.Set;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.TableGenerator;
import javax.validation.constraints.NotNull;
import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooEntity(versionField = "", table = "cliente")
public class Cliente {

    @Id
    @TableGenerator(name = "GEN_CLIE", table = "sequence", pkColumnName = "SEQ_NAME", valueColumnName = "SEQ_COUNT", pkColumnValue = "SEQ_CLIE", allocationSize = 1)
	@GeneratedValue(strategy=GenerationType.TABLE, generator="GEN_CLIE")
    @Column(name = "ID_CLIENTE", columnDefinition = "INT UNSIGNED")
    private Integer idCliente;

    @OneToMany(mappedBy = "idCliente")
    private Set<Sucursal> sucursals;

    @Column(name = "NOMBRE_CLIENTE", columnDefinition = "VARCHAR", length = 50)
    @NotNull
    private String nombreCliente;

    @Column(name = "NOMBRE_CORTO_CLIENTE", columnDefinition = "VARCHAR", length = 15)
    @NotNull
    private String nombreCortoCliente;

    @Column(name = "NOMBRE_CONTACTO", columnDefinition = "VARCHAR", length = 80)
    @NotNull
    private String nombreContacto;

    @Column(name = "EMAIL", columnDefinition = "VARCHAR", length = 50)
    @NotNull
    private String email;

    @Column(name = "TELEFONO", columnDefinition = "VARCHAR", length = 14)
    private String telefono;

    @Column(name = "DIRECCION", columnDefinition = "VARCHAR", length = 100)
    private String direccion;

    @Column(name = "CP", columnDefinition = "VARCHAR", length = 5)
    private String cp;

    @Column(name = "CIUDAD", columnDefinition = "VARCHAR", length = 20)
    private String ciudad;
}
